<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <title>用户详情</title>
    <th:block th:replace="/common_resources::common_css"></th:block>
    <th:block th:replace="/common_resources::common_js"></th:block>
</head>

<body class="hold-transition skin-purple sidebar-mini">

<header th:replace="~{/common_header::header}"></header>
<aside th:replace="~{/common_aside::aside}"></aside>

    <div class="wrapper">
        <div class="content-wrapper">

            <!-- 内容头部 -->
            <section class="content-header">
                <h1>
                    管理员管理
                    <small>管理员详情</small>
                </h1>
                <ol class="breadcrumb">
                    <li><a th:href="@{/index}"><i class="fa fa-dashboard"></i> 首页</a></li>
                    <li><a th:href="@{/admin/all}">管理员管理</a></li>
                    <li class="active">管理员详情</li>
                </ol>
            </section>
            <!-- 内容头部 /-->

            <!-- 正文区域 -->
            <section class="content">
                <table id="collapse-table" class="table table-bordered table-hover dataTable">
                    <thead>
                    <tr>
                        <th>名称</th>
                        <th>详情</th>
                    </tr>
                    </thead>
                    <tr>
                        <td th:text="${admin.name}"></td>
                    </tr>
                    <tbody th:each="role,status:${admin.roleList}">
                        <tr th:attr="data-tt-id=${status.index}" >
                            <td th:text="${role.roleName}"></td>
                            <td th:text="${role.roleDesc}"></td>
                        </tr>
                        <tr th:each="permission:${role.permissionList}" th:attr="data-tt-parent-id=${status.index}" data-tt-id="1-1">
                            <td th:text="${permission.permission}"></td>
                            <td th:text="${permission.url}"></td>
                        </tr>
                    </tbody>

                </table>

            </section>
            <!-- 正文区域 /-->
        </div>
    </div>

<footer th:replace="~{/common_footer::footer}"></footer>
<script>
    $(document).ready(function () {
        $("#collapse-table").treetable({
            expandable:true
        });
    })
</script>
</body>

</html>